/*
 * 
 * liuhongjun
 * 修改成功提示框
 * 引用modityTip.css
 * 
 */
function CheckUpdateFalied(){
	var tipHtml = '';
	tipHtml = '<span class="gtl_ico_fail"></span>'+ErrorMsgConstants.ERR_TIP_MODIFY;
	$("#tip").html(tipHtml);
$(".msgbox_layer_wrap").css("display","block");
	$(".msgbox_layer_wrap").show();
	var st = setTimeout(function (){
		$(".msgbox_layer_wrap").hide();
		$(".msgbox_layer_wrap").css("display","none");

		clearTimeout(st);
	},1000);
}
function CheckUpdateSuccess(){
	var tipHtml = '';
	tipHtml = '<span class="gtl_ico_succ"></span>'+ValidMsgConstants.MODIFY_TIP;
	
	$("#tip").html(tipHtml);
	$(".msgbox_layer_wrap").css("display","block");
	$(".msgbox_layer_wrap").show();
	var st = setTimeout(function (){
		$(".msgbox_layer_wrap").hide();
		$(".msgbox_layer_wrap").css("display","none");
		
		clearTimeout(st);
	},1000);
}

/**
 * 
 * 正在加载图片显示
 * liuhongjun
 * divId:加载部分的外部DIV
 * megId:要加载的部分
 * 0:加载图显示
 * 1:图片加载
 * 2:非加载形式
 * */
function loading(divId){
	var divWidth = ($("#"+divId).position().left + $("#"+divId).width()/2)+"px";
	var divTop = ($("#"+divId).position().top + $("#"+divId).height()/2)+"px";
	var loadingImg = "<div id='loading' class='loading'><div class='loading_img'></div><div class='loading_text'>正在加载...</div></div>";
	$("#loading").css("left",divWidth);
	$("#loading").css("top",divTop);
	$("#"+divId).prepend(loadingImg);
}
function loadingWaiting(divId , megId, type){
	if(type.indexOf("0") != -1){
		loading(divId);
		}
	if(type.indexOf("1") != -1){
		document.getElementById(megId).onload = function(){
			$("#loading").css("display","none");
		};
	}
	if(type.indexOf("2") != -1){
		$("#loading").css("display","none");
	}
}